package tr3dtris.game.models.pieces;

import tr3dtris.game.models.CellArray;

/**
 * Abstract class used as base to build all the basic game pieces.
 * The basic game pieces are the standard old-style tretris pieces
 * composed by four blocks.
 * @author Luciano Mammino <loige@hotmail.com>
 * @author Andrea Mangano <kapitan0@hotmail.it>
 * @version 0.1
 * @since 0.1
 */
public abstract class BasicPiece extends AbstractPiece
{
    /**
     * The constant used to indicate the piece id
     */
    protected static int PIECE_ID = 0;
    
    /**
     * Fixed width of the basic pieces
     */
    protected static final int WIDTH = 5;

    /**
     * Fixed height of the basic pieces
     */
    protected static final int HEIGHT = 5;

    /**
     * Constructor. Creates a new <AbstractPiece> in a given board point (cell).
     * @param x X coordinate for the piece creation point
     * @param y Y coordinate for the piece creation point
     * @param blockType Id of the blockType
     */
    public BasicPiece(int x, int y, CellArray parentGrid, int blockType)
    {
        super(x, y, parentGrid, blockType);
    }

    /**
     * {@inheritDoc}
     */
    public BasicPiece(AbstractPiece pieceToCopy)
    {
        super(pieceToCopy);
    }

    /**
     * {@inheritDoc}
     */
    public boolean isRotable()
    {
        return true;
    }
}
